﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MedicinaMuncii.Entities;
using MedicinaMuncii.Repository.Contracts;
using System.Linq.Expressions;

namespace MedicinaMuncii.BL.Contracts
{
    public interface IEntityService<T> where T : IObjectWithChangeTracker
    {
        T GetByID(Expression<Func<T, bool>> idSelector, params string[] includes);
        IList<T> GetAll(params string[] includes);
        void Add(T entity);
        void Update(T entity);
        void Save(T entity);
        IList<T> Find(Expression<Func<T, bool>> where);
        void Delete(Expression<Func<T, bool>> idSelector);
        void Delete(T entity);
    }
}
